# author：shangzi
# e-mail：724674401@qq.com
# lastUpdate：2022/8/23


#启动kafka
cd /kafka/kafka_2.11-1.0.0/
# echo "advertised.listeners=PLAINTEXT://${IP}:9092">> ./config/server.properties
# mkdir /log
# touch /log/zookeeper.log
# touch /log/kafka.log
# ./bin/zookeeper-server-start.sh config/zookeeper.properties > /log/zookeeper.log &
# ./bin/kafka-server-start.sh config/server.properties > /log/kafka.log &
# sleep 3

#创建topic
./bin/kafka-topics.sh --create --zookeeper ${IP}:2181 --replication-factor 1 --partitions 1 --topic acResp
./bin/kafka-topics.sh --create --zookeeper ${IP}:2181 --replication-factor 1 --partitions 5 --topic acReq

./bin/kafka-topics.sh --create --zookeeper ${IP}:2181 --replication-factor 1 --partitions 1 --topic cfResp
./bin/kafka-topics.sh --create --zookeeper ${IP}:2181 --replication-factor 1 --partitions 1 --topic cfReq

#启动爬虫节点


cd /workDir/codeforces/ && ./codeforces &
cd /workDir/atcoder/
yarn start > /dev/null 


